Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update copy.h #633

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Update copy.h #633

wants to merge 6 commits into from

Conversation

reubes
Copy link

@reubes reubes commented Jun 22, 2021

check available destination space before copy

check available destination space before copy
@@ -17,10 +17,17 @@
#include <cstdio>
#include <cstdint>

#include <filesystem>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that has created many problems before, gotta souround all of it with #ifdef __linux__

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, no real programming experience so forgive my terrible coding...

@reubes reubes marked this pull request as draft June 23, 2021 11:51

inline
uint64_t copy_file(const std::string& src_path, const std::string& dst_path)
{
#ifdef __linux__
int plotsize = 109000000000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that number fits into an int lol
you need uint64_t here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it const uint64_t too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I was wondering about that! I guess it would be better to get the real size value but just put a rough value for now

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a constant anyways, all good

reubes added 4 commits June 23, 2021 21:15
add room for alternate destination directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants